<!doctype html public "-//w3c//dtd html 4.0 transitional//en">


<!-- WARNING! This file is generated. -->
<!-- To alter documentation, edit files in src directory -->


<html><head>
<title>Defining Test Suites</title>
<link rel="stylesheet" href="utplsql.css" content="text/css">
<meta name="keywords" content="utPLSQL, PL\SQL, Unit Testing, Framework, Oracle"/>
<meta name="description" content="Unit Testing PL\SQL"/>
<meta name="title" content="Defining Test Suites"/>
<meta name="author" content="Steven Feuerstein, Chris Rimmer, Patrick Barel"/>
<meta name="copyright" content="(C) 2000-2005 Steven Feuerstein, Chris Rimmer, Patrick Barel"/>
</head><body>
<div class="purple_bar"><a href="index.html"><img src="utplsql.jpg" border=0></a></div>
<p>[ <A href="index.html">Home</A>
 | <A href="started.html">Getting Started</A>
 | <A href="buildpack.html">Build Test Packages</A>
 | <A href="examples.html">Examples</A>
 | <A href="userguide.html">User Guide</A>
 | <A href="release.html">Release Notes</A>
 | <A href="map.html">Document Map</A> ]</p>
<p><A href="utreceq.html">&lt; Previous Section: utRecEq Package</A> | <A href="reporter.html">Next Section: Custom Reporter Packages &gt;</A></p>
<!-- Begin utPLSQL Body -->
<!-- $Id: defsuite.html,v 1.4 2005/05/10 14:23:03 chrisrimmer Exp $ -->
<h1>
Defining Test Suites</h1>

If you define test suites and register packages
within those suites, then utPLSQL will run an unlimited number of
tests with a single command.

<h3>Note</h3>

<ul type="disc">
<li>
All suite names are stored in upper case.</li>

<li>
If you do not specify a directory (dir_in),
you will need to call utConfig.setdir if you want automatic compilation
of your packages to occur.</li>

<li>If you supply a value for seq_in, packages
will be compiled and tested in ascending numeric sequence order.</li>

<li>When you call utSuite.rem, it will remove all
packages for that suite by calling utPackage.rem.</li>
</ul>

<h2>
utSuite - Define Test Suites</h2>

To create and remove test suites, call these programs:

<pre>
   PROCEDURE utSuite.add (
      name_in IN VARCHAR2,
      desc_in IN VARCHAR2 := NULL,
      rem_if_exists_in IN BOOLEAN := TRUE
      );

   PROCEDURE utSuite.rem (name_in IN VARCHAR2);</pre>

These programs manipulate the contents of the ut_suite
table. See the tables.sql file for the DDL creating this table.

<h2>
 utPackage - Define Test Packages for a Suite</h2>

To register  a package in a suite, call the following:

<pre>   PROCEDURE utPackage.add (
      suite_in IN VARCHAR2,
      package_in IN VARCHAR2,
      samepackage_in IN BOOLEAN := FALSE,
      prefix_in IN VARCHAR2 := NULL,
      dir_in IN VARCHAR2 := NULL,
      seq_in IN PLS_INTEGER := NULL,
      owner_in IN VARCHAR2 := NULL,
      add_tests_in IN BOOLEAN := FALSE,
      test_overloads_in IN BOOLEAN := FALSE
   );</pre>

This manipulates the contents of the ut_package
table. See the tables.sql file for the DDL creating this table.

Here is a sample script that defines a very small
portion of the PL/Vision test suite:

<pre>BEGIN
   utSuite.add ('PLVision');
  
   utPackage.add
      'PLVision', 'PLVstr', dir_in =&gt; 'e:\utplsql\test');
  
   utPackage.add (
      'PLVision', 'PLVdate', dir_in =&gt; 'e:\utplsql\test'');
  
   utPLSQL.testsuite ('PLVision', recompile_in =&gt; TRUE);
END;
/</pre>

<!-- End utPLSQL Body -->
<p><A href="utreceq.html">&lt; Previous Section: utRecEq Package</A> | <A href="reporter.html">Next Section: Custom Reporter Packages &gt;</A></p>
<div class="purple_bar"><a href="index.html"><img src="utplsql.jpg" border=0></a></div>
<p class="copyright">Copyright (C) 2000-2005 <A href="mailto:steven@stevenfeuerstein.com">Steven Feuerstein<A>, <A href="mailto:c@24.org.uk">Chris Rimmer<A>, <A href="mailto:pbarel@vda.nl">Patrick Barel<A> All rights reserved</p>
</body></html>